﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/OpenDelib.Master" CodeBehind="ListeRecueils.aspx.vb" Inherits="OpenDelib.ListeRecueils" %>
<%@ Register TagPrefix="cc1" Namespace="Odyssee.WebControles" Assembly="Odyssee.WebControles" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">    
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="toolbar" runat="server">   
    <hr/>
    <cc1:ToolBar ID="tbDossiers" runat="server" CssClass="toolbar">
        <items>
            <cc1:ToolBarTextImageButton ID="btnActualiser" runat="server" Text="Actualiser" ImageWidth="20" ImageHorizontalOffset="4" ImageUrl="~/Images/refresh_white_20.png" />
            <cc1:ToolBarSeparator ID="tbSep1" runat="server" Offset="2" />
            <cc1:ToolBarPopupButton ID="btnGenererRecueil" runat="server" Text="Générer un recueil" DisplayMode="TextImageButton" ImageWidth="20" ImageHorizontalOffset="4" ImageUrl="~/Images/plus_white_20.png" DoPostBack="true" Title="Générer un recueil" PopupHeight="530" PopupWidth="530" PopupUrl="~/Recueils/GenerationRecueil.aspx" PopupPanelID="pnlRecueil" URLParameters="" />
        </items>
    </cc1:ToolBar> 
    <hr/>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="content" runat="server">

    <cc1:JQPopupPanel ID="pnlRecueil" runat="server" PopupHeight="540" PopupWidth="700" Style="display: none;" Close="True" />

    <div style="margin:15px; font-family:'Segoe UI';">
        <cc1:AcroGridView ID="gvRecueils" runat="server" AutoGenerateColumns="false" CssClass="grid" AllowPaging="true" PageSize="10" PagerStyle-CssClass="gridpager" AllowSorting="false" EmptyDataText="Aucun recueil" EmptyDataRowStyle-HorizontalAlign="Center" ShowHeaderWhenEmpty="True">
            <Columns>
                <cc1:BoundField DataField="Cle" ReadOnly="True" SortExpression="Cle" HeaderText="Numéro" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Wrap="false" />
                <cc1:BoundField DataField="Objet1" ReadOnly="True" SortExpression="Objet1" HeaderText="Objet" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Wrap="false" />
                <cc1:BoundField DataField="DateEmission" ReadOnly="True" SortExpression="DateEmission" HeaderText="Date d'émission" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Wrap="false" />
                <asp:TemplateField SortExpression="CheminDocument">
                    <ItemStyle HorizontalAlign="Right" />
                    <ItemTemplate>
                        <a href="<%#Eval("CheminDocument").ToString()%>" target="_blank" style=" border:none; text-decoration:none; visibility:<%#IIf(Eval("CheminDocument").ToString() = "", "hidden", "visible")%>;">
                            <img src="../Images/view_20.png" alt="Ouvrir" title="Ouvrir" style="vertical-align:bottom;" />
                        </a>
                        <asp:ImageButton ID="btnSupprimer" runat="server" AlternateText="Supprimer" CommandArgument='<%#Eval("Cle")%>' CommandName="Supprimer" ImageUrl="~/Images/cancel_20.png" OnClientClick="return confirm('Êtes-vous sûr de vouloir supprimer ce recueil ?');" ToolTip="Supprimer" style="vertical-align:bottom;" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </cc1:AcroGridView>
    </div>

</asp:Content>
